gtk4.git
4 years agogdk: Always request "flush events" frame clock phase on events
Carlos Garnacho [Wed, 26 Jan 2022 14:49:29 +0000 (15:49 +0100)]
gdk: Always request "flush events" frame clock phase on events

This change is done for 2 reasons:

- The logic to request this phase when compressing scroll events is
  slightly broken. If there are multiple scroll events that are
  coalesced into one, the surface frame clock will not get this request.
  The worst case is having >= 2 scroll events on every frame, as the
  compressed event will be left in the queue, and be further compressed
  on future events.

- Even scroll events aside, this phase is requested in oddly specific
  places that are not enough to cover all events, others do rely on
  unrelated GdkFrameClock activity that happens to flush the events
  as well.

Unify this phase request so it explicitly happens on the arrival of any
event. This ensures that events (compressed or not) will be handled
promptly after arrival.

4 years agoMerge branch 'fix-popovermenu-removechild' into 'main'
Emmanuele Bassi [Tue, 25 Jan 2022 15:40:28 +0000 (15:40 +0000)]
Merge branch 'fix-popovermenu-removechild' into 'main'

popovermenu: Fix crash when removing child

See merge request GNOME/gtk!4393

4 years agopopovermenu: Fix crash when removing child
Kévin Commaille [Tue, 25 Jan 2022 14:31:00 +0000 (15:31 +0100)]
popovermenu: Fix crash when removing child

gtk_menu_section_box_remove_custom was looking in the wrong place for the
stack ancestor, causing an assertion error.

4 years agoUpdate Chinese (China) translation
Boyuan Yang [Mon, 24 Jan 2022 19:46:37 +0000 (19:46 +0000)]
Update Chinese (China) translation

4 years agoUpdate Brazilian Portuguese translation
Leônidas Araújo [Mon, 24 Jan 2022 17:08:46 +0000 (17:08 +0000)]
Update Brazilian Portuguese translation

4 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 23 Jan 2022 15:19:39 +0000 (15:19 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use pango api better

See merge request GNOME/gtk!4412

4 years agoUse pango api better
Matthias Clasen [Sun, 23 Jan 2022 14:55:46 +0000 (09:55 -0500)]
Use pango api better

Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.#

4 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 23 Jan 2022 14:34:58 +0000 (14:34 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use pango api better

See merge request GNOME/gtk!4411

4 years agoUse pango api better
Matthias Clasen [Sun, 23 Jan 2022 14:09:57 +0000 (09:09 -0500)]
Use pango api better

Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.

4 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 23 Jan 2022 04:29:58 +0000 (04:29 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use pango api better

See merge request GNOME/gtk!4409

4 years agoUse pango api better
Matthias Clasen [Sat, 22 Jan 2022 18:37:32 +0000 (13:37 -0500)]
Use pango api better

Avoid direct access to PangoLayoutLine members,
use pango api for it where we can.

4 years agoUpdate Hebrew translation
Yaron Shahrabani [Fri, 21 Jan 2022 16:04:24 +0000 (16:04 +0000)]
Update Hebrew translation

4 years agoUpdate Hebrew translation
Yaron Shahrabani [Fri, 21 Jan 2022 15:53:39 +0000 (15:53 +0000)]
Update Hebrew translation

4 years agoMerge branch 'targz' into 'main'
Emmanuele Bassi [Wed, 19 Jan 2022 19:58:36 +0000 (19:58 +0000)]
Merge branch 'targz' into 'main'

ci: Put gtk dll into an archive

Closes #4653

See merge request GNOME/gtk!4403

4 years agoci: Only use letters in "expose_as"
Guido Günther [Wed, 19 Jan 2022 15:39:44 +0000 (16:39 +0100)]
ci: Only use letters in "expose_as"

4 years agoci: Put gtk dll into an archive
Guido Günther [Wed, 19 Jan 2022 15:37:36 +0000 (16:37 +0100)]
ci: Put gtk dll into an archive

This avoids the wild card that makes the CI fail

4 years agoUpdate Chinese (China) translation
Dz Chen [Wed, 19 Jan 2022 15:44:00 +0000 (15:44 +0000)]
Update Chinese (China) translation

4 years agoMerge branch 'win32-gl-improvements' into 'main'
Matthias Clasen [Wed, 19 Jan 2022 13:49:40 +0000 (13:49 +0000)]
Merge branch 'win32-gl-improvements' into 'main'

Windows: Some fixes to GL context realization (EGL/GLES in particular)

See merge request GNOME/gtk!4386

4 years agoMerge branch 'bilelmoussaoui/g-i' into 'main'
Matthias Clasen [Wed, 19 Jan 2022 13:48:57 +0000 (13:48 +0000)]
Merge branch 'bilelmoussaoui/g-i' into 'main'

g-i: mark gtk_text_iter_get_child_anchor as nullable

See merge request GNOME/gtk!4401

4 years agoMerge branch 'provide-libgtk-dll-as-ci-artifact' into 'main'
Luca Bacci [Wed, 19 Jan 2022 11:17:28 +0000 (11:17 +0000)]
Merge branch 'provide-libgtk-dll-as-ci-artifact' into 'main'

Provide GTK DLL as GitLab CI artifact

See merge request GNOME/gtk!4395

4 years agoProvide GTK DLL as GitLab CI artifact
Luca Bacci [Wed, 19 Jan 2022 11:17:28 +0000 (11:17 +0000)]
Provide GTK DLL as GitLab CI artifact

4 years agoMerge branch 'context-early' into 'main'
Carlos Garnacho [Wed, 19 Jan 2022 10:48:48 +0000 (10:48 +0000)]
Merge branch 'context-early' into 'main'

gtkimcontextwayland: Remember context on focus-in so enable can happen later

See merge request GNOME/gtk!4397

4 years agog-i: mark gtk_text_iter_get_paintable as nullable
Bilal Elmoussaoui [Wed, 19 Jan 2022 10:22:40 +0000 (10:22 +0000)]
g-i: mark gtk_text_iter_get_paintable as nullable

4 years agogtkimcontextwayland: Save context even when text_input isn't around yet
Guido Günther [Tue, 18 Jan 2022 13:22:24 +0000 (14:22 +0100)]
gtkimcontextwayland: Save context even when text_input isn't around yet

Remember the current context on focus-in even though the text-input
isn't set up yet. This helps in the case where the text-input is not yet
created but a widget already got focused. Without that the enable()
invocation in text_input_enter() woulnd't be invoked leaving the input
method disabled.

This fixes

    gtk4-demo --run=search_entry

which would initially not show the on-screen keyboard when e.g using
phoc/sway as compositor.

4 years agog-i: mark gtk_text_iter_get_child_anchor as nullable
Bilal Elmoussaoui [Wed, 19 Jan 2022 10:18:40 +0000 (10:18 +0000)]
g-i: mark gtk_text_iter_get_child_anchor as nullable

4 years agogdkdisplay-win32.c: Clean up GL initialization further
Chun-wei Fan [Tue, 18 Jan 2022 16:18:07 +0000 (00:18 +0800)]
gdkdisplay-win32.c: Clean up GL initialization further

4 years agoGDK: Force GLES 3.0+ on libANGLE
Chun-wei Fan [Tue, 18 Jan 2022 16:16:11 +0000 (00:16 +0800)]
GDK: Force GLES 3.0+ on libANGLE

...when libANGLE is being used on Windows, by checking for a
Windows-specific an ANGLE-specific extension.

4 years agoCleanup "GDK/Win32: Try to fix initializing GLES contexts"
Chun-wei Fan [Tue, 18 Jan 2022 02:41:28 +0000 (10:41 +0800)]
Cleanup "GDK/Win32: Try to fix initializing GLES contexts"

As per Benjamin's suggestions, cleanup the previous implementation on
initializing the GLES context on Windows, so that we use more items that are
already in GDK proper and integrate two functions into one.

4 years agogdkglcontext-win32-wgl.c: Cleanup GL context creation
Chun-wei Fan [Mon, 17 Jan 2022 10:14:30 +0000 (18:14 +0800)]
gdkglcontext-win32-wgl.c: Cleanup GL context creation

Instead of first trying to explicitly ask for a WGL 4.1 context, ask for
the WGL context version that matches what is reported via
epoxy_gl_version(), so that we get the maximum WGL version that is
supported by the graphics drivers, and make sure any WGL contexts that
are shared with this (initial) WGL context are created likewise.

We can try to do a default-bog-standard 3.2 core WGL context creation
if the need arises, but let's leave that alone for now.

4 years agogdkglcontext.c: Ensure EGL contexts are in-sync with shared context
Chun-wei Fan [Mon, 17 Jan 2022 09:27:10 +0000 (17:27 +0800)]
gdkglcontext.c: Ensure EGL contexts are in-sync with shared context

The EGL context that we are actually creating must have matching OpenGL/ES
versions and allowed GL API set with the previously-created EGL context
that will be shared with it so that they can interoperate together, if
applicable.

This will fix the situation by making sure that we request for the
OpenGL/ES version and OpenGL API set that match with what we have in our shared
EGL context.  Otherwise, the newly-created EGL context assumed a OpenGL/ES 2.0
context that supported desktop OpenGL, which may not be what we wanted, such as
in the case of libANGLE.

4 years agoGDK/Win32: Try to fix initializing GLES contexts
Chun-wei Fan [Mon, 17 Jan 2022 08:11:27 +0000 (16:11 +0800)]
GDK/Win32: Try to fix initializing GLES contexts

We are now able to create EGL contexts properly on Windows, but not GLES.  This
tries to fix things by doing the following:

*  Record the GL context type in a more proper fashion, using an Enum.  This
   makes things a bit cleaner.
*  Force GLES-3.0+ contexts, since libANGLE requires this to properly work with
   the shaders-its 2.0 contexts don't work well with our shaders.

4 years agogskrenderer.c: Use GL renderer on Windows by default
Chun-wei Fan [Mon, 17 Jan 2022 06:40:23 +0000 (14:40 +0800)]
gskrenderer.c: Use GL renderer on Windows by default

Since now we have the shaders working on Windows under GLES with libANGLE using
a 3.0+ context, drop the check to fall back to the Cairo renderer when GLES is
being used.

4 years agoMerge branch 'wip/wayland-surface-offset' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:48:26 +0000 (23:48 +0000)]
Merge branch 'wip/wayland-surface-offset' into 'main'

Fix DND hotspot position under Wayland + EGL/Vulkan

See merge request GNOME/gtk!3705

4 years agoMerge branch 'gdksurface-wayland-assert' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:46:59 +0000 (23:46 +0000)]
Merge branch 'gdksurface-wayland-assert' into 'main'

gdksurface-wayland: Fix contradictory assert

See merge request GNOME/gtk!4385

4 years agoMerge branch 'gsk-transform-nullable' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:44:23 +0000 (23:44 +0000)]
Merge branch 'gsk-transform-nullable' into 'main'

Mark various GskTransform functions as nullable in their return value

See merge request GNOME/gtk!4378

4 years agoMerge branch 'document_shortcut_func_ret' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:41:15 +0000 (23:41 +0000)]
Merge branch 'document_shortcut_func_ret' into 'main'

gtk: document return value of ShortcutFunc

See merge request GNOME/gtk!4389

4 years agoMerge branch 'wip/dont-always-restore-saved-gtk4' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:40:49 +0000 (23:40 +0000)]
Merge branch 'wip/dont-always-restore-saved-gtk4' into 'main'

wayland: Don't always restore the saved size when floating

Closes #4634

See merge request GNOME/gtk!4394

4 years agoMerge branch 'build-post-install-query-media-modules' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 23:39:26 +0000 (23:39 +0000)]
Merge branch 'build-post-install-query-media-modules' into 'main'

Meson: Also query media modules in post-install

See merge request GNOME/gtk!4380

4 years agoMerge branch 'ebassi/fix-release-test' into 'main'
Matthias Clasen [Tue, 18 Jan 2022 15:07:37 +0000 (15:07 +0000)]
Merge branch 'ebassi/fix-release-test' into 'main'

reftest: Avoid assertions being compiled out

See merge request GNOME/gtk!4391

4 years agowayland: Don't always restore the saved size when floating
Jonas Ådahl [Tue, 18 Jan 2022 14:45:30 +0000 (15:45 +0100)]
wayland: Don't always restore the saved size when floating

We only save the size when we transition from floating to fixed, so that
we can restore the size to the one prior to being fixed.

However, we should not restore to this size whenever we see a 0x0 size
from xdg_toplevel, as it can do that any time it doesn't care about the
size, e.g. when the surface is floating and just changing state.

Fix this by only using the saved size when transitioning from fixed to
floating, not when staying floating while previously floating.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4634
4 years agoreftest: Avoid assertions being compiled out
Emmanuele Bassi [Tue, 18 Jan 2022 12:30:47 +0000 (12:30 +0000)]
reftest: Avoid assertions being compiled out

Calling functions inside a g_assert() means those functions will be
compiled out when building with G_DISABLE_ASSERT.

This fixes the release job in the CI pipeline.

4 years agogtk: document return value of ShortcutFunc
Alexandros Theodotou [Tue, 18 Jan 2022 10:58:47 +0000 (10:58 +0000)]
gtk: document return value of ShortcutFunc

4 years agoMerge branch 'fix-keyboard-shortcuts-win32' into 'main'
Luca Bacci [Mon, 17 Jan 2022 13:34:17 +0000 (13:34 +0000)]
Merge branch 'fix-keyboard-shortcuts-win32' into 'main'

Win32 key events cleanup

See merge request GNOME/gtk!4349

4 years agoGdkWin32: Add translation result w/o CAPS LOCK to key events for accelerator matching
Luca Bacci [Fri, 14 Jan 2022 18:26:07 +0000 (19:26 +0100)]
GdkWin32: Add translation result w/o CAPS LOCK to key events for accelerator matching

4 years agoGdkWin32: Remove _gdk_input_codepage variable
Luca Bacci [Fri, 14 Jan 2022 14:09:48 +0000 (15:09 +0100)]
GdkWin32: Remove _gdk_input_codepage variable

It's unused

4 years agoGdkWin32: Code reorganization for gdk_event_translate
Luca Bacci [Fri, 14 Jan 2022 13:47:29 +0000 (14:47 +0100)]
GdkWin32: Code reorganization for gdk_event_translate

4 years agoMerge branch 'ebassi/issue-4596' into 'main'
Matthias Clasen [Mon, 17 Jan 2022 12:58:01 +0000 (12:58 +0000)]
Merge branch 'ebassi/issue-4596' into 'main'

i18n: Detect more translatable attribute values

Closes #4596

See merge request GNOME/gtk!4383

4 years agoMerge branch 'win32-imcontextime-ignore-control-characters' into 'main'
Luca Bacci [Mon, 17 Jan 2022 11:44:12 +0000 (11:44 +0000)]
Merge branch 'win32-imcontextime-ignore-control-characters' into 'main'

Fix handling of control characters & remove Win32-specific hacks from gdkkeyuni.c

Closes #2865

See merge request GNOME/gtk!4387

4 years agoGtkIMContextIME: Ignore ASCII control characters
Philip Zander [Mon, 17 Jan 2022 10:56:48 +0000 (11:56 +0100)]
GtkIMContextIME: Ignore ASCII control characters

Make GtkIMContextIME ignore ASCII control characters just like other
IMContext implementations (e.G. GtkIMContextSimple). Fixes bogus
characters appearing in text input fields (old bug 676077).

4 years agoRevert "Bug 676077: Fix handling of Keyboard Input on Windows"
Chun-wei Fan [Mon, 17 Jan 2022 03:15:51 +0000 (11:15 +0800)]
Revert "Bug 676077: Fix handling of Keyboard Input on Windows"

The actual code that does the IM context code handling on Windows now uses the
native Windows APIs to handle keystrokes, so this patch is no longer needed, as
it was found that it instead caused issues.

Pointed out in issue #2865.

This reverts commit fd6ce9975e4cc9c090d07e7a6b0013d02b49ce26.

4 years agogdksurface-wayland: Fix contradictory assert
Kritphong Mongkhonvanit [Mon, 17 Jan 2022 06:33:46 +0000 (01:33 -0500)]
gdksurface-wayland: Fix contradictory assert

gdk_wayland_toplevel_inhibit_idle() contained a contradictory assert
that always fail. More specifically, in the branch that is supposed to
create the idle inhibitor, there is an assertion that it must already
exist and that the refcount must be greater than zero. This causes a
crash on WMs/DEs that use the ZWP idle inhibit manager protocol such as
KDE Plasma and Sway. Fix this by just asserting that the refcount is
zero instead.

4 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 16 Jan 2022 19:38:08 +0000 (21:38 +0200)]
Updated Lithuanian translation

4 years agoi18n: Detect more translatable attribute values
Emmanuele Bassi [Sun, 16 Jan 2022 14:03:05 +0000 (14:03 +0000)]
i18n: Detect more translatable attribute values

GtkBuilder uses GMarkup, which defines a boolean attribute value as:

- yes/no
- true/false
- 1/0

The ITS file for GtkBuilder UI definitions is only using the first pair,
likely because Glade only ever used those values. GTK's own tools, though,
will typically simplify the full yes/no and true/false strings to 1 and 0,
to minimise the parsing time.

Fixes: #4596
4 years agopost install: query media modules
Luca Bacci [Fri, 14 Jan 2022 17:53:36 +0000 (18:53 +0100)]
post install: query media modules

4 years agoMark various GskTransform functions as nullable in their return value
Sebastian Dröge [Fri, 14 Jan 2022 09:57:23 +0000 (11:57 +0200)]
Mark various GskTransform functions as nullable in their return value

Various transforms are normalized with their next transform, and if they
end up being the identity transform will return NULL.

For example a translation by (x,y,z) and followed by (-x,-y,-z) will
result in NULL.

4 years agowayland/surface: Use wl_surface_offset() instead of x,y of attach()
Jonas Ådahl [Mon, 22 Mar 2021 10:51:37 +0000 (11:51 +0100)]
wayland/surface: Use wl_surface_offset() instead of x,y of attach()

This makes the hotspot of DND surfaces work when using the Vulkan and
OpenGL renderers.

This bumps the CI image used to the newly built image. This is needed to
install a new enough libwayland-client.so needed for wl_surface.offset.

This is done by adding wayland as a meson subproject, building it
on-demand if the version in the system is not new enough. As
libwayland-client.so is pulled in implicitly when linking to gtk4, the
compile step needs LD_LIBRARY_PATH set to make ld find the right library
to link to.

4 years agoMerge branch 'win32-fix-altgr-gtk4' into 'main'
Luca Bacci [Thu, 13 Jan 2022 23:02:50 +0000 (23:02 +0000)]
Merge branch 'win32-fix-altgr-gtk4' into 'main'

IMContextSimple/IMContextIME: Fix AltGr not working on Win32 [GTK4]

See merge request GNOME/gtk!4375

4 years agoUpdate Chinese (China) translation
Boyuan Yang [Thu, 13 Jan 2022 20:20:45 +0000 (20:20 +0000)]
Update Chinese (China) translation

4 years agoMerge branch 'ebassi/docs-repo-link' into 'main'
Emmanuele Bassi [Thu, 13 Jan 2022 16:58:47 +0000 (16:58 +0000)]
Merge branch 'ebassi/docs-repo-link' into 'main'

docs: Point source links to the correct branch

See merge request GNOME/gtk!4373

4 years agoIMContextSimple/IMContextIME: Fix AltGr not working on Win32
Philip Zander [Thu, 13 Jan 2022 12:43:23 +0000 (13:43 +0100)]
IMContextSimple/IMContextIME: Fix AltGr not working on Win32

The old code assumed that any key press containing Ctrl or Alt cannot be
regular text input. This is not correct on Win32 as AltGr = Ctrl + Alt.

4 years agoUpdate the link to the development branch
Emmanuele Bassi [Thu, 13 Jan 2022 14:40:50 +0000 (14:40 +0000)]
Update the link to the development branch

The default development branch for GTK is now "main".

4 years agodocs: Point to the correct development branch
Emmanuele Bassi [Thu, 13 Jan 2022 14:39:39 +0000 (14:39 +0000)]
docs: Point to the correct development branch

The default development branch of GTK is now "main".

4 years agodocs: Point source links to the correct branch
Emmanuele Bassi [Thu, 13 Jan 2022 14:39:03 +0000 (14:39 +0000)]
docs: Point source links to the correct branch

The default development branch for GTK is now "main".

4 years agoUpdate POTFILES.in
Piotr Drąg [Thu, 13 Jan 2022 12:43:15 +0000 (13:43 +0100)]
Update POTFILES.in

4 years agoMerge branch 'forward-port-gdk-win32-keymap-bugfixes-to-gtk4' into 'main'
Luca Bacci [Wed, 12 Jan 2022 21:36:19 +0000 (21:36 +0000)]
Merge branch 'forward-port-gdk-win32-keymap-bugfixes-to-gtk4' into 'main'

GdkWin32Keymap bugfixes

See merge request GNOME/gtk!4372

4 years agoUpdate Galician translation
Fran Dieguez [Wed, 12 Jan 2022 21:35:13 +0000 (21:35 +0000)]
Update Galician translation

4 years agoUpdate Galician translation
Fran Dieguez [Wed, 12 Jan 2022 21:34:57 +0000 (21:34 +0000)]
Update Galician translation

4 years agogdkkeys-win32: Perform keyboard layout substitution
David Hogan [Wed, 12 Jan 2022 20:41:02 +0000 (21:41 +0100)]
gdkkeys-win32: Perform keyboard layout substitution

For some users, GetKeyboardLayoutNameA() returns an alias instead of the
fully resolved keyboard layout identifier. In that case, we have to
query the registry to resolve the alias before we can look up the DLL
path.

See comments under https://gitlab.gnome.org/GNOME/gtk/-/issues/4610

4 years agogdkkeys-win32: Fix handling of SGCAPS
Philip Zander [Wed, 12 Jan 2022 20:36:41 +0000 (21:36 +0100)]
gdkkeys-win32: Fix handling of SGCAPS

Contrary to what you can read on the internet, SGCAPS keys don't work
by having capslock toggle the KBDCTRL bit, they actually have two
consecutive table entries, the first of which is for the normal
version and the second of which is for the capslocked version.

Background: SGCAPS is short for Swiss German caps because Swiss German
was the first layout to use this feature. For keys with the SGCAPS flag,
capslock has a different effect than pressing shift. For example:
Shift + ü = è,  CapsLock + ü = Ü,  CapsLock + Shift + ü = È

4 years agogdkkeys-win32: Fix crash when keyboard DLL failed to load
Philip Zander [Wed, 12 Jan 2022 20:31:21 +0000 (21:31 +0100)]
gdkkeys-win32: Fix crash when keyboard DLL failed to load

DLL loading failures should not happen under normal circumstances, but
we should at least try not to crash and and print better diagnostic
messages if they do happen.

See https://gitlab.gnome.org/GNOME/gtk/-/issues/4610

4 years agogdkkeys-win32: Add keysym mapping for capslock key
Philip Zander [Wed, 12 Jan 2022 20:19:10 +0000 (21:19 +0100)]
gdkkeys-win32: Add keysym mapping for capslock key

Add missing mapping between VK_CAPITAL and GDK_KEY_Caps_Lock, so
applications get a meaningful keyval rather than ffffff.

4 years agogdkkeys-win32: Fix capslock handling
Philip Zander [Wed, 12 Jan 2022 20:17:28 +0000 (21:17 +0100)]
gdkkeys-win32: Fix capslock handling

Previously, we treated CapsLock and KanaLock as part of the global
keyboard state, much like NumLock and ScrollLock, rather than using
the supplied modifier mask. This was because GDK does not have a
modifier mask for KanaLock, only for CapsLock, so it would not have been
possible to properly support it.

However, this approach ended up causing problems, with certain keyboard
shortcuts not registering when capslock was active. This was first
observed in Inkscape [0] and appears to affect shortcuts consisting of a
single key (like 'a') with no additional modifiers (wheareas shortcuts
like 'ctrl+a' work).

So now we are using the supplied GDK_LOCK_MASK instead, and dropped
support for KanaLock, which we probably don't need anyway (since regular
text input should be handled by the IME input module -- the keymap is
mainly for shortcuts and keybindings, where you don't really want
KanaLock).

[0] https://gitlab.com/inkscape/inkscape/-/issues/3082

4 years agoMerge branch 'forward-port-rewrite-gdkwin32keymap-to-gtk4' into 'main'
Luca Bacci [Wed, 12 Jan 2022 19:53:54 +0000 (19:53 +0000)]
Merge branch 'forward-port-rewrite-gdkwin32keymap-to-gtk4' into 'main'

Rewrite GdkWin32Keymap (V2)

Closes #1033 and #2055

See merge request GNOME/gtk!4338

4 years agoMerge branch 'fix-build-no-pangoft' into 'main'
Luca Bacci [Wed, 12 Jan 2022 19:53:39 +0000 (19:53 +0000)]
Merge branch 'fix-build-no-pangoft' into 'main'

Improve and fix building font features on Windows (was: Fix builds without PangoFT2)

Closes #4605

See merge request GNOME/gtk!4339

4 years agoMerge branch 'fabian.kirsch-main-patch-28134' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 19:38:10 +0000 (19:38 +0000)]
Merge branch 'fabian.kirsch-main-patch-28134' into 'main'

corrected small typo input-handling.md

See merge request GNOME/gtk!4368

4 years agoMerge branch '4627-printing-Unref-old-spool_io-before-setting-new-one' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 19:37:18 +0000 (19:37 +0000)]
Merge branch '4627-printing-Unref-old-spool_io-before-setting-new-one' into 'main'

printing: Unref old spool_io before setting new one

Closes #4627

See merge request GNOME/gtk!4370

4 years agoMerge branch 'revert-texture-annotations' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 19:34:18 +0000 (19:34 +0000)]
Merge branch 'revert-texture-annotations' into 'main'

Revert "gir: Annotate `GdkTexture` constructors for reading from a...

See merge request GNOME/gtk!4371

4 years agoRevert "gir: Annotate `GdkTexture` constructors for reading from a file/memory/resour...
Matthias Clasen [Wed, 12 Jan 2022 19:11:13 +0000 (14:11 -0500)]
Revert "gir: Annotate `GdkTexture` constructors for reading from a file/memory/resource to return a `GdkMemoryTexture`"

This reverts commit ae8e844dec16d55184367db4cd7e7ae215e3605a.

No agreement that this will stay this way going forward.

4 years agoRewrite GdkWin32Keymap (load table directly from layout DLL)
Philip Zander [Wed, 5 Jan 2022 14:44:49 +0000 (15:44 +0100)]
Rewrite GdkWin32Keymap (load table directly from layout DLL)

The old code used repeated calls to `ToUnicodeEx` to populate
the translation table, which is slow and buggy. The new code
directly loads the layout driver DLLs from Windows.

See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4338

4 years agoprinting: Unref old spool_io before setting new one
Marek Kasik [Wed, 12 Jan 2022 11:36:44 +0000 (12:36 +0100)]
printing: Unref old spool_io before setting new one

Unref private spool_io of GtkPrintJob before setting it to a new one
in gtk_print_job_set_source_file() and gtk_print_job_set_source_fd()
to prevent a leak.

Fixes: #4627
4 years agomeson.build: Don't apply iso-codes cflag on Windows
Chun-wei Fan [Mon, 10 Jan 2022 07:04:57 +0000 (15:04 +0800)]
meson.build: Don't apply iso-codes cflag on Windows

They are no longer applicable for Windows builds.

4 years agodemos: Always build font explorer demo
Chun-wei Fan [Mon, 10 Jan 2022 06:56:27 +0000 (14:56 +0800)]
demos: Always build font explorer demo

We are no longer using PangoFT2 APIs in this demo, so make sure that we build
it on all builds since we already depend on a HarfBuzz/Pango version that
provide everything that we need here.

Drop the unnecessary pangofc-font.h include as a result.

4 years agogtk-demo/language-names.c: Acquire language names natively on Windows
Chun-wei Fan [Mon, 10 Jan 2022 06:54:23 +0000 (14:54 +0800)]
gtk-demo/language-names.c: Acquire language names natively on Windows

Like what was done on gtk/language-names.c, acquire the language names via the
native Windows NLS APIs, eliminating a run-time dependency on iso-codes on
Windows.

4 years agolanguage-names: Use Windows APIs to acquire language names
Chun-wei Fan [Mon, 10 Jan 2022 06:49:42 +0000 (14:49 +0800)]
language-names: Use Windows APIs to acquire language names

Instead of relying on the iso-codes package, use the native Windows NLS APIs to
acquire the localized (translated) language names so that we do not need to
incur an extra runtime dependency on Windows.  It's not coverering 100% of the
languages that we would like to support through this, but should cover much of
the things that are required.

4 years agogtk/meson.build: Fix builds without PangoFT2
Chun-wei Fan [Wed, 5 Jan 2022 09:50:29 +0000 (17:50 +0800)]
gtk/meson.build: Fix builds without PangoFT2

We aren't really using PangoFT2 for [language|script]-names.c, and are
always using items from them, so make sure they are being built.

Also always include the pangoft2 dependency in gtk_dep if it is found.

4 years agocorrected small typo input-handling.md
Fabian Kirsch [Wed, 12 Jan 2022 09:02:01 +0000 (09:02 +0000)]
corrected small typo input-handling.md

4 years agoMerge branch 'fix-directory-list' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:58:25 +0000 (02:58 +0000)]
Merge branch 'fix-directory-list' into 'main'

directorylist: Fix several issues

Closes #3784

See merge request GNOME/gtk!4367

4 years agoMerge branch 'should_be_mapped' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:48:10 +0000 (02:48 +0000)]
Merge branch 'should_be_mapped' into 'main'

gdk/wayland/surface: Remove redundant `should_be_mapped` code

See merge request GNOME/gtk!4203

4 years agoMerge branch 'wip/keep-scale' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:46:43 +0000 (02:46 +0000)]
Merge branch 'wip/keep-scale' into 'main'

wayland/surface: Only update the scale if on any outputs

See merge request GNOME/gtk!4352

4 years agoMerge branch 'ebassi/for-main' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:45:15 +0000 (02:45 +0000)]
Merge branch 'ebassi/for-main' into 'main'

tests: Don't drop chdir()'s return value on the floor

See merge request GNOME/gtk!4328

4 years agoMerge branch 'bilelmoussaoui/build' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:44:29 +0000 (02:44 +0000)]
Merge branch 'bilelmoussaoui/build' into 'main'

meson: only update-icon-cache when the demos are built

See merge request GNOME/gtk!4358

4 years agoMerge branch 'drop-script-names' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:43:54 +0000 (02:43 +0000)]
Merge branch 'drop-script-names' into 'main'

Drop the script name data

See merge request GNOME/gtk!4361

4 years agoMerge branch 'texture-new-return-types' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:42:17 +0000 (02:42 +0000)]
Merge branch 'texture-new-return-types' into 'main'

gir: Annotate `GdkTexture` constructors for reading from a...

See merge request GNOME/gtk!4365

4 years agoMerge branch 'nielsdg/gsk-gl-renderer-assertion' into 'main'
Matthias Clasen [Wed, 12 Jan 2022 02:41:32 +0000 (02:41 +0000)]
Merge branch 'nielsdg/gsk-gl-renderer-assertion' into 'main'

gsk: Document gsk_renderer_realize()

See merge request GNOME/gtk!4363

4 years agodirectorylist: Fix several issues
Matthias Clasen [Wed, 12 Jan 2022 02:35:19 +0000 (21:35 -0500)]
directorylist: Fix several issues

We were handling events in the wrong order,
by doing async calls for some of them, but not
for all of them.

And we were not taking into account that GFileMonitors
RENAMED events may or may not move a file on top
of an existing file.

Fixes: #3784
4 years agogir: Annotate `GdkTexture` constructors for reading from a file/memory/resource to...
Sebastian Dröge [Tue, 11 Jan 2022 13:46:22 +0000 (15:46 +0200)]
gir: Annotate `GdkTexture` constructors for reading from a file/memory/resource to return a `GdkMemoryTexture`

4 years agogsk: Document gsk_renderer_realize()
Niels De Graef [Tue, 11 Jan 2022 09:04:16 +0000 (10:04 +0100)]
gsk: Document gsk_renderer_realize()

Document the return value and more importantly, specify that a call to
`gsk_renderer_realize()` needs to be matched with a call
`gsk_renderer_unrealize()`.

Prevents issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/4625

4 years agoDrop the script name data
Matthias Clasen [Mon, 10 Jan 2022 14:19:46 +0000 (09:19 -0500)]
Drop the script name data

It is not used in GTK itself, and gtk4-demo
has its own copy.

4 years agoUpdate Persian translation
Danial Behzadi [Mon, 10 Jan 2022 11:39:53 +0000 (11:39 +0000)]
Update Persian translation

4 years agoMerge branch 'docs-typo-list' into 'main'
Emmanuele Bassi [Sun, 9 Jan 2022 13:28:57 +0000 (13:28 +0000)]
Merge branch 'docs-typo-list' into 'main'

Fix typo in IconView docs

See merge request GNOME/gtk!4360